package com.wlc.service;

import com.wlc.dao.PersonMapper;
import com.wlc.pojo.Person;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 王立朝
 * @description 实现类
 * @date 2021-12-14 12:26:10
 */
@Service
public class PersonServiceImpl implements PersonService{

    @Autowired
    private PersonMapper personMapper;
    /**
     * 查询所有的人类
     *
     * @return
     */
    @Override
    public List<Person> selectAllPerson() {
        return personMapper.selectList(null);
    }

    /**
     * 保存
     * @param person
     * @return
     */
    @Override
    public int save(Person person) {
        return personMapper.insert(person);
    }
}
